﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ServiceBase;
using System.Drawing;
using ServicePrice;
public partial class _Default : System.Web.UI.Page
{
    string url;
    protected void Page_Load(object sender, EventArgs e)
    {
        url = txtURL.Text.Trim();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Bitmap map = GetBitmap.From_URL(url);
        SimpleColor.TwoColor1(map);
        Helper_View.View.View_Bitmap(map);
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Bitmap map = GetBitmap.From_URL(url);
        SimpleColor.TwoColor1(map);
        Bitmap[] list = Split.ByEmptyColumn(map);
        list = Split.ByLimitWidth(list, 8, 6);
        Helper_View.View.View_Bitmap(list);
    }
    #region 有货
    protected void btnYouhuo_Click(object sender, EventArgs e)
    {
        btnYouhuo.Text = new www_yohobuy_com().DoRecognition(url);
    }
    protected void btnPick_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_yohobuy_com().ViewMatrix(dir);
    }
    protected void btnBuilderMatrix_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_yohobuy_com().CreateMatrix(dir);
    } 
    #endregion
    #region 乐蜂
    protected void btnLeFeng_Pick_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_LeFeng_com().ViewMatrix(dir);
    }
    protected void btnLeFeng_Matrix_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_LeFeng_com().CreateMatrix(dir);
    }
    protected void btnLeFeng_Click(object sender, EventArgs e)
    {
        btnLeFeng.Text = new www_LeFeng_com().DoRecognition(url);
    } 
    #endregion
    #region 京东
    protected void btnJingdong_Click(object sender, EventArgs e)
    {
        btnJingdong.Text = new www_360buy_com().DoRecognition(url);
    }
    protected void btnJingdong_Pick_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_360buy_com().ViewMatrix(dir);
    }
    protected void btnJingdong_Matrix_Click(object sender, EventArgs e)
    {
        string dir = @"C:\Documents and Settings\Administrator\桌面\新建文件夹";
        new www_360buy_com().CreateMatrix(dir);
    } 
    #endregion
}